/* prop-node样式 */
.prop-node-int,
.prop-node-float,
.prop-node-string,
.prop-node-boolean,
.prop-node-enum,
.prop-node-asset,
.prop-node-spriteframe,
.prop-node-jsonAsset,
.prop-node-particle,
.prop-node-animation,
.prop-node-audio,
.prop-node-skeleton,
.prop-node-color,
.prop-node-prefab {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    /* border: 1px solid red; */
}

.int-label,
.float-label,
.string-label,
.boolean-label,
.enum-label,
.asset-label,
.spriteframe-label,
.prefab-label,
.jsonAsset-label,
.particle-label,
.animation-label,
.audio-label,
.skeleton-label,
.vec2-label,
.vec3-label,
.color-label,
.size-label {
    text-align: left;
    white-space: nowrap;
    width: fit-content;
    min-width: 120px;
    overflow: visible;
}

.int-input,
.float-input,
.string-input,
.boolean-select,
.enum-select,
.asset-input,
.spriteframe-input,
.prefab-input,
.jsonAsset-input,
.particle-input,
.animation-input,
.audio-input,
.skeleton-input,
.color-input {
    flex: 1;
    min-width: 0;
}

.prop-node-vec2,
.prop-node-vec3,
.prop-node-size {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.input-x,
.input-y,
.input-x,
.input-y,
.input-z {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding-left: 16px;
}

.input-x > ui-label,
.input-y > ui-label,
.input-z > ui-label {
    width: fit-content;
    min-width: min-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.array-header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 2px 0;
}
.array-header-left {
    width: 40%;
}
.array-header-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}
.array-length-label {
    width: fit-content;
    min-width: min-content;
    white-space: nowrap;
    overflow: visible;
}

.prop-node-array,
.prop-node-object {
    width: 100%;
}

.object-header {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 0;
}

.object-header:hover {
    color: #4a90e2;
    border-left-color: #4a90e2;
}

.array-content,
.object-content {
    margin-left: 16px;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;

    &.collapsed {
        display: none;
    }
}

.prop-arrow {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    
    &::before {
        content: '';
        border: 6px solid transparent;
        border-left-color: #fff;
        transition: transform 0.2s;
        transform-origin: 30% center;
    }
    
    &.expanded::before {
        transform: rotate(90deg);
    }
}

.object-header:hover .prop-arrow::before {
    border-left-color: #4a90e2;
}

/* 实体拖拽区域样式 */
.prop-node-entity {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.prop-node-entity .entity-label {
    flex: 0 0 120px;
    margin-right: 8px;
}

.prop-node-entity .entity-drop-area {
    flex: 1;
    min-height: 18px;
    border: 1px dashed #666;
    border-radius: 4px;
    padding: 4px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
}

.prop-node-entity .entity-drop-area:hover {
    border-color: #999;
    background-color: rgba(255, 255, 255, 0.05);
}

.prop-node-entity .entity-drop-area.has-entity {
    border-style: solid;
    background-color: rgba(255, 255, 255, 0.1);
}

.prop-node-entity .entity-drop-area ui-icon {
    opacity: 0.6;
    cursor: pointer;
}

.prop-node-entity .entity-drop-area ui-icon:hover {
    opacity: 1;
}